package com.cjm.one.webmanager.controller.pay;

import com.alipay.api.AlipayApiException;
import com.cjm.one.common.result.Result;
import com.cjm.one.model.payment.entity.AliPay;
import com.cjm.one.webmanager.service.pay.PayService;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@Tag(name = "3-订单信息")
@RequestMapping("/manager/pay/alipay")
public class AilPayController {
    @Resource
    private PayService payService;
    @PostMapping("/return")
    public Result<Boolean> returnPay(@RequestBody AliPay aliPay) throws AlipayApiException {
        return Result.ok(payService.returnPay(aliPay));
    }
}
